home *** CD-ROM | disk | FTP | other *** search
- property pSprite, pLocOffset, pActive, pConstrained
-
- on getBehaviorDescription me
- return "ÉhÉâÉbÉOâ¬î\" & RETURN & RETURN & "ÉXÉvÉâÉCÉgÇÃÉhÉâÉbÉOâ¬î\Ç»ÉvÉçÉpÉeÉBÇÃê›íËÇ…éóǃǮÇËÅAÉXÉvÉâÉCÉgǝÉ}ÉEÉXÉ{É^ÉìÇÃÉNÉäÉbÉNÇ‚ÉhÉâÉbÉOÇ… âûìöÇŽÇþÇ‹ÇÝÅBÉXÉvÉâÉCÉgÇÃàžìÆîÕàÕÇÕÅAÉXÉeÅ[ÉWóÃàÊÇ…å¿ÇÁÇÍǃǢÇÈèÍçáǙdžÇËÇ‹ÇÝÅB" & RETURN & RETURN & "óLå–ÉÅÉìÉoÅ[É^ÉCÉv:" & RETURN & "ÉOÉâÉtÉBÉbÉNÉÅÉìÉoÅ[" & RETURN & RETURN & "ÉfÉWÉ^ÉãÉrÉfÉIÇ‚ÅAǪÇÃëºÇÃ[ÉXÉeÅ[ÉWç¼ëOñ Ç…íuǍ]Ç™ÉIÉvÉVSÉáÉìÇÃÉXÉvÉâÉCÉgǼÇÕÅA[ÉXÉeÅ[ÉWç¼ëOñ Ç…íuǍ]ǝégópïsî\DžǵǃǮǍÇÐÅAó«Ç¢åãâ Ç™ìæÇÁÇÍÇ‹ÇÝÅB" & RETURN & RETURN & "ÉpÉâÉÅÅ[É^:" & RETURN & "- ÉXÉeÅ[ÉWÇ…å¼íË"
- end
-
- on getBehaviorTooltip me
- return "ÉXÉvÉâÉCÉgǝÉhÉâÉbÉOǼǴÇÈÇÊǧDžǵNjÇÝÅBÉ}ÉEÉXÉ{É^ÉìǝâüǵǃǢÇÈä‘ÅAÉXÉvÉâÉCÉgÇÕ ÉJÅ[É\ÉãÇ…âàǡǃàžìÆÇµÇ‹ÇÝÅB"
- end
-
- on beginSprite me
- pSprite = sprite(me.spriteNum)
- vMember = pSprite.member
- case vMember.type of
- #animGif, #flash, #quickTimeMedia, #digitalVideo, #vectorShape:
- if vMember.directToStage then
- alert("Sprite" && pSprite.spriteNum & ": Direct To Stage media may cause" && "playback problems with the 'Moveable Sprite' behavior.")
- end if
- end case
- pActive = 0
- end
-
- on mouseUp me
- global withlist
- if sprite(the currentSpriteNum).within(the currentSpriteNum - 40) then
- mDrag(0)
- if getAt(withlist, the currentSpriteNum - 50) = 0 then
- puppetSound(1, 44)
- set the loc of sprite the currentSpriteNum to the loc of sprite (the currentSpriteNum - 40)
- setAt(withlist, the currentSpriteNum - 50, 1)
- sprite(the currentSpriteNum).locZ = the currentSpriteNum - 200
- end if
- end if
- mDrag(0)
- end
-
- on mouseDown me
- global plocz, withlist
- if sprite(the currentSpriteNum).within(the currentSpriteNum - 40) then
- mDrag(0)
- else
- mDrag(1)
- end if
- if getAt(withlist, the currentSpriteNum - 50) = 0 then
- plocz = plocz + 1
- sprite(the currentSpriteNum).locZ = plocz
- end if
- end
-
- on prepareFrame me
- if the mouseUp then
- mDrag(0)
- end if
- if pActive then
- mDragSprite(me)
- end if
- end
-
- on mDrag vActive
- pActive = vActive
- pLocOffset = pSprite.loc - the mouseLoc
- sendAllSprites(#Active_Sprite, the currentSpriteNum * pActive)
- end
-
- on mDragSprite
- pSprite.loc = the mouseLoc + pLocOffset
- if pConstrained then
- vLeftDiff = pSprite.rect.left
- if vLeftDiff < 0 then
- pSprite.locH = pSprite.locH - vLeftDiff
- end if
- vRightDiff = pSprite.rect.right - (the stage).rect.width
- if vRightDiff > 0 then
- pSprite.locH = pSprite.locH - vRightDiff
- end if
- vTopDiff = pSprite.rect.top
- if vTopDiff < 0 then
- pSprite.locV = pSprite.locV - vTopDiff
- end if
- vBottomDiff = pSprite.rect.bottom - (the stage).rect.height
- if vBottomDiff > 0 then
- pSprite.locV = pSprite.locV - vBottomDiff
- end if
- end if
- end
-
- on Forwarded_mouseDown me
- if not pActive then
- mDrag(1)
- end if
- return the currentSpriteNum
- end
-
- on isOKToAttach me, aSpriteType, aSpriteNum
- return aSpriteType = #graphic
- end
-
- on getPropertyDescriptionList
- vPDList = [:]
- setaProp(vPDList, #pConstrained, [#comment: "ÉXÉeÅ[ÉWÇ…å¼íË", #format: #boolean, #default: 1])
- return vPDList
- end
-